package org.ctstudio.oa.duty.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.UpdateProvider;
import org.ctstudio.oa.duty.bean.AbnormalSignApply;
import org.ctstudio.oa.duty.bean.Apply;
import org.ctstudio.oa.duty.bean.ApplyQuery;

@Mapper
public interface AbnormalSignMapper {
  @InsertProvider(type = AbnormalSignSql.class, method = "add")
  int add(AbnormalSignApply apply);

  @Delete("DELETE FROM duty.abnormalsignapply WHERE id=#{id}")
  int del(long id);

  @UpdateProvider(type = AbnormalSignSql.class, method = "edit")
  int edit(AbnormalSignApply apply);

  AbnormalSignApply get(long id);

  long count(ApplyQuery query);

  List<AbnormalSignApply> query(ApplyQuery query);

  @UpdateProvider(type = AbnormalSignSql.class, method = "approve")
  int approve(Apply apply);
}
